<include file="Public:wapheader" />
<style>
	#wrapper {
		position: absolute;
		top: 30px;
		bottom: 0em;
		left: -8px;
		width: 100%;
	}
</style>
<div class="header1">
	<ul class="nav">
		<li>
			<a href="{:U('cust/index')}">全部</a>
		</li>
		<li>
			<a href="javascript:void(0)">总价</a>
			<div class="list2">

				<ul>
					<li><a href="{:U('cust/index')}">不限</a></li>
					<li><a href="{:U('cust/index',array ('price'=>'0-100'))}">100万以下</a></li>
					<li><a href="{:U('cust/index',array ('price'=>'100-150'))}">100-150万</a></li>
					<li><a href="{:U('cust/index',array ('price'=>'150-200'))}">150-200万</a></li>
					<li><a href="{:U('cust/index',array ('price'=>'200-250'))}">200-250万</a></li>
					<li><a href="{:U('cust/index',array ('price'=>'250-300'))}">250-300万</a></li>
					<form nam="" action="{:U('cust/index')}" method="post">
						<p>
							自定义价格：
							<input type="text" name="price_min" placeholder="最小" /> -
							<input type="text" name="price_max" placeholder="最大" />
							<input type="submit" name="" value="确定">
						</p>
					</form>
				</ul>
			</div>
		</li>
		<li>
			<a href="javascript:void(0)">房型</a>
			<div class="list2">
				<ul>
					<li><a href="{:U('cust/index')}">不限</a></li>
					<li><a href="{:U('cust/index',array ('need_type'=>'0-1'))}">1室</a></li>
					<li><a href="{:U('cust/index',array ('need_type'=>'0-2'))}">2室</a></li>
					<li><a href="{:U('cust/index',array ('need_type'=>'0-3'))}">3室</a></li>
					<li><a href="{:U('cust/index',array ('need_type'=>'0-4'))}">4室</a></li>
					<li><a href="{:U('cust/index',array ('need_type'=>'0-5'))}">5室</a></li>
					<li><a href="{:U('cust/index',array ('need_type'=>'5'))}">5室以上</a></li>
				</ul>
			</div>
		</li>
		<li>
			<a href="javascript:void(0)">更多</a>
			<div class="list2">
				<ul>
					<li><a href="{:U('cust/index')}">全部客源</a></li>
					<li><a href="{:U('cust/index',array ('demand'=>1))}">求租</a></li>
					<li><a href="{:U('cust/index',array ('demand'=>2))}">求购</a></li>
				</ul>
			</div>
		</li>
	</ul>
</div>
		<div class="page12">
			
			<div class="mainner">
				<div class="cont" id="wrapper">
					<ul id="scroller">
						<volist name="customs" id="vo">
							<li>
								<div class="list">
									<h4>{$vo.title}
										<i>
											<for start="1" end="$vo.leve" comparison="elt">
												<img src="/Public/Wap/images/icon3.png" />
											</for>
										</i>
									</h4>
									<div class="t_left">
										<p>
											<span><if condition="$vo.price neq '0'"> {$vo.price} 万<else/>不限</if> </span>
											<span><if condition="$vo.area neq '0'">{$vo.area} ㎡<else/>不限</if>  </span>
											<span><if condition="$vo.need_type neq '0'">{$vo.need_type} 室<else/>不限</if> </span></p>
										<p><span>{$vo.ename}</span></p>
									</div>
									<div class="t_right">
										<a href="tel:{$vo.contact}"><img src="/Public/Wap/images/icon6.png" /></a>
									</div>
									<div class="clear"></div>
									<p class="link"><a href="javascript:void(0)"></a><a href="javascript:void(0)"></a><a href="javascript:void(0)"></a></p>
									<p class="time"><span></span></p>
								</div>
							</li>
						</volist>
					</ul>
					<input type="hidden" name="page" id="page" value="{$page}">
					<input type="hidden" name="map" id="map" value='{$map}'>

				</div>
			</div>
			
		</div>

<script>
	var myScroll = new IScroll('#wrapper', {
		disableMouse: true,
		disablePointer: true,
		fadeScrollbars: true,
		click: true,
		tap: true
	});
	// 上拉滑动事件
	myScroll.on("scrollEnd",function(){
		var y = myScroll.y, maxScrollY = myScroll.maxScrollY;
		if (y == maxScrollY){
			var page = $('#page').val ();
			var map = $('#map').val ();
			var url = "{:U('cust/loading')}";
			var data = {page:page,map:map};
			$.post (url, data, function (respose){
				if (respose.state == 'ok'){
					$('#page').val (respose.page);
					$('#map').val (respose.map);
					var data = respose.data;
					var html = '';
					$.each (data, function (i,v){
						var img = '';
						for (var c=1; c<=v.leve; c++){
							img += '<img src="/Public/Wap/images/icon3.png" />';
						}
						html += '<li><div class="list">' +
								' <h4>'+v.title+'<i>'+img+'</i> </h4>' +
								' <div class="t_left"><p><span>'+v.price+' 万</span>' +
								'<span>'+v.area+' ㎡</span> ' +
								'<span>'+v.need_type+' 室</span></p>' +
								'<p><span>'+v.ename+'</span></p></div>' +
								'<div class="t_right"><a href="tel:'+v.contact+'"><img src="/Public/Wap/images/icon6.png" /></a></div>' +
								'<div class="clear"></div><p class="link"><a href="javascript:void(0)"></a><a href="javascript:void(0)"></a>' +
								'<a href="javascript:void(0)"></a></p><p class="time"><span></span></p></div></li>'
					});
					$('#scroller').append(html);
					myScroll.refresh();
					myScroll.scrollTo(0, maxScrollY*6, 100,IScroll.utils.ease.circular);
				}
			},'json');
		}
	});
	//解决点不了A标签
	$('#scroller a').on('tap', function (){
		$url = $(this).attr ('href');
		location.href = $url;
	});

</script>
<include file="Public:magfooter" />
